package www.openteam.com.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 支付类别,货币类别,送货类别的通用bean
 * Created by kylin on 2016/10/11.
 */

public class CustomConditon implements Parcelable {


    public CustomConditon(int type, int paytype, int moneytype) {
        this.type = type;
        this.paytype = paytype;
        this.moneytype = moneytype;
    }

    int type = 0;
    int paytype = 0;
    int moneytype = 0;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getPaytype() {
        return paytype;
    }

    public void setPaytype(int paytype) {
        this.paytype = paytype;
    }

    public int getMoneytype() {
        return moneytype;
    }

    public void setMoneytype(int moneytype) {
        this.moneytype = moneytype;
    }

    @Override
    public String toString() {
        return "CustomConditon{" +
                "type=" + type +
                ", paytype=" + paytype +
                ", moneytype=" + moneytype +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(type);
        dest.writeInt(paytype);
        dest.writeInt(moneytype);
    }

    public static final Parcelable.Creator<CustomConditon> CREATOR = new Creator<CustomConditon>() {
        @Override
        public CustomConditon[] newArray(int size) {
            return new CustomConditon[size];
        }

        @Override
        public CustomConditon createFromParcel(Parcel in) {
            return new CustomConditon(in);
        }
    };

    public CustomConditon(Parcel in) {
        type = in.readInt();
        moneytype = in.readInt();
        paytype = in.readInt();
    }
}
